package com.igo.domain.datacollection.devicedata;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@TableName("di_flat_car_data")
@Schema(description = "平板车数据")
public class FlatCarData {
    //平板车
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;
    private String oilQuantity;
    private String loadCapacity;
    private String hydraulicCylinderPressure1;
    private String hydraulicCylinderPressure2;
    private String hydraulicCylinderPressure3;
    private String hydraulicCylinderPressure4;
    //通用字段
    //电压
    private String voltage;
    //电流
    @TableField(value="`current`")
    private String current;
    //运行状态
    private String runningState;
    //经度
    private String longitude;
    //纬度
    private String latitude;

    private String deviceNo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dataTime;

    @TableField(exist = false)
    private String dayTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private String remark;

    private String originDataId;

//    @TableLogic
    private String delFlag;

    @TableField(exist = false)
    private String productId;

    private String isCalculate;

    /** 油箱长度 */
    @TableField(exist = false)
    private Long oilLength;

    /** 油箱宽度 */
    @TableField(exist = false)
    private Long oilWidth;

    /** 油箱高度 */
    @TableField(exist = false)
    private Long oilHeight;

    /**
     * 任务id
     */
    private String calcdNo;

    /**
     * 最大载重
     */
    @TableField(exist = false)
    private String maxLoadCapacity;

    @TableField(exist = false)
    private long timestamp;

//    @TableField(exist = false)
//    private String productId;


    public long getTimestamp() {
        return getDataTime().getTime();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOilQuantity() {
        return oilQuantity;
    }

    public void setOilQuantity(String oilQuantity) {
        this.oilQuantity = oilQuantity;
    }

    public String getLoadCapacity() {
        return loadCapacity;
    }

    public void setLoadCapacity(String loadCapacity) {
        this.loadCapacity = loadCapacity;
    }

    public String getHydraulicCylinderPressure1() {
        return hydraulicCylinderPressure1;
    }

    public void setHydraulicCylinderPressure1(String hydraulicCylinderPressure1) {
        this.hydraulicCylinderPressure1 = hydraulicCylinderPressure1;
    }

    public String getHydraulicCylinderPressure2() {
        return hydraulicCylinderPressure2;
    }

    public void setHydraulicCylinderPressure2(String hydraulicCylinderPressure2) {
        this.hydraulicCylinderPressure2 = hydraulicCylinderPressure2;
    }

    public String getHydraulicCylinderPressure3() {
        return hydraulicCylinderPressure3;
    }

    public void setHydraulicCylinderPressure3(String hydraulicCylinderPressure3) {
        this.hydraulicCylinderPressure3 = hydraulicCylinderPressure3;
    }

    public String getHydraulicCylinderPressure4() {
        return hydraulicCylinderPressure4;
    }

    public void setHydraulicCylinderPressure4(String hydraulicCylinderPressure4) {
        this.hydraulicCylinderPressure4 = hydraulicCylinderPressure4;
    }

    public String getVoltage() {
        return voltage;
    }

    public void setVoltage(String voltage) {
        this.voltage = voltage;
    }

    public String getCurrent() {
        return current;
    }

    public void setCurrent(String current) {
        this.current = current;
    }

    public String getRunningState() {
        return runningState;
    }

    public void setRunningState(String runningState) {
        this.runningState = runningState;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

    public Date getDataTime() {
        return dataTime;
    }

    public void setDataTime(Date dataTime) {
        this.dataTime = dataTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getOriginDataId() {
        return originDataId;
    }

    public void setOriginDataId(String originDataId) {
        this.originDataId = originDataId;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getIsCalculate() {
        return isCalculate;
    }

    public void setIsCalculate(String isCalculate) {
        this.isCalculate = isCalculate;
    }

    public Long getOilLength() {
        return oilLength;
    }

    public void setOilLength(Long oilLength) {
        this.oilLength = oilLength;
    }

    public Long getOilWidth() {
        return oilWidth;
    }

    public void setOilWidth(Long oilWidth) {
        this.oilWidth = oilWidth;
    }

    public Long getOilHeight() {
        return oilHeight;
    }

    public void setOilHeight(Long oilHeight) {
        this.oilHeight = oilHeight;
    }

    public String getMaxLoadCapacity() {
        return maxLoadCapacity;
    }

    public void setMaxLoadCapacity(String maxLoadCapacity) {
        this.maxLoadCapacity = maxLoadCapacity;
    }
}
